<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" type="text/css" href="__CSS__/main.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/common.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/bootstrap.min.css" />
    <script type="text/javascript" src="__EXTEND__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/layer/2.4/layer.js"></script>
    <![endif]-->
    <title></title>
</head>
<body>
<div class="contant">
<div class="row">
        <div class="top">业务部>抵押资料补录</div>
        <div class="content applylist">
            <div class="box">
                <h1>抵押资料补录</h1>
                <div class="list-block">
                    <div class="row">
                    </div>
                    <div class="row">
                        <table class="list">
                         <thead>
                            <tr>
                             <th class="row-selected row-selected"><input type="checkbox" id="selectall" value="1" /></th>
                                <th>编号</th>
                                 <th>申请人</th>
                                 <th>身份证号</th>
                                 <th>手机号</th>
                                 <th>业务部门</th>
                                 <th>申请时间</th>
                                 <th>状态</th>
                                 <th>进入当前状态时间</th>
                                 <!-- <th>审核状态</th> -->
                                 <th>银行</th>
                                 <th>操作</th>
                            </tr>
                          </thead>
                          <tbody class="tbody thmb">
                            <volist name="list" id="user">
                                <tr>
                                    <td><span class="ckbox"><input class="ids" type="checkbox" name="id[]" value="{$user.id}"/></span></td>
                                    <td>{$user.entry_no}</td>
                                    <td>{$user.user_name}</td>
                                    <td>{$user.identity_no}</td>
                                    <td>{$user.telephone}</td>
                                    <td>{$user.department_name}</td>
                                    <td>{$user.create_time|date='Y-m-d H:i:s', ###}</td>
                                    <td>银行抵押合同已提交</td>
                                    <td>{$user.update_time|date='Y-m-d H:i:s', ###}</td>
                                    <td>{$user.bank_short_name}</td>
                                    <if condition='$user.pledge_status eq 0'>
                                      <td class="check" data-id='{$user.id}' data-status='{$user.check_status}'>补录</td>
                                      <else/>
                                      <td>已补录,未寄</td>
                                    </if>

                                </tr>
                            </volist>
                            </tbody>
                        </table>
                        <div class="clearfix">
                            <button class="actBtn btn btn-default btn_50"" data-id='{$list.id}' data-toggle="modal" data-act='1' data-target='#myModal' type="button">寄出</button>
                        </div>
                    </div>
                    {$page}
                </div>
            </div>
        </div>
    </div>
</div>
             <!-- 模态框 start -->
<div id="myModal" class="modal fade in" style="display: none;">
    <div class="modal-dialog modal-lg" style='width:720px;'>
        <!--  -->
            <div class="modal-content" style="padding-bottom:0px;">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                    <h4 class="modal-title">数据加载中……</h4>
                </div>
                <div class="modal-body" style='height:400px;overflow-y:auto;'>数据加载中……</div>
                <div class="modal-footer" style="margin-top:0px;">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
</div>
    <!-- 模态框 end -->
         <div class="express hide">
                <h1>快递录入<span>(标*为必填项)</span></h1>
                <div class="list-block">
                    <div class="row">
                        <label>寄件人:</label>
                        <input type="text" name="send_name" value=''>
                        <label>收件人:</label>
                        <input type="text" name="addressee" value=''>
                    </div>
                    <div class="row">
                        <label>快递单号:</label>
                        <input type="text" name="express_number" value=''>
                       <!--  <label>客户姓名:</label>
                        <input type="text" name="user_name" value='{$user.user_name}'> -->
                    </div>
                    <div class="row">
                        <label>快递内容:</label>
                        <input type='checkbox' id='file11' name='file[]' value='11' ><span for="file11">发票</span>
                        <input type='checkbox' id='file12' name='file[]' value='12' ><span for="file12">合格证</span>
                        <input type='checkbox' id='file13' name='file[]' value='13' ><span for="file13">保单</span>
                        <input type='checkbox' id='file20' name='file[]' value='20' ><span for="file20">行驶证复印件</span>
                    </div>
                    <div class="row">
                        <label>快递时间:</label>
                        <input type="date" name="express_times" placeholder="请选择时间" value="{:date('Y-m-d')}" />
                        <label>快递公司:</label>
                        <select name="company_id" id="form-field-10">
                            <foreach name="express_company" item="v" >
                             <if condition="$key eq $info['company_id']">
                            <option value={$key} selected>{$v}</option>
                             <else />
                             <option value={$key}>{$v}</option>
                            </if>
                            </foreach>
                        </select>
                    </div>
                    <input name='act' value='1' type='hidden'/>
          </div>
     </div>
<script type="text/javascript">
        $('#selectall').click(function(){
                if($(this).is(':checked')) {
                    $('.thmb').each(function(){
                        $(this).find('input').attr('checked',true);
                    });
                } else {
                    $('.thmb').each(function(){
                        $(this).find('input').attr('checked',false);
                    });
                }
            });
       $('.ckbox').click(function(){$('#selectall').attr('checked',false);});
            $('.actBtn').click(function(){
                var act = $(this).data('act'), id = $(this).data('id'), html = '', title = '', ids = '0';;
                $.each($('.ids:checked'), function(i, v){ids += ',' + $(v).val();});
                   if(ids == '0'){
                        alert('请勾选需要操作的会员！');
                    }else{
                            html += '<div class="com_form"><form action="{:U("Pledge/add_expressInfo")}" method="post" id="baseForm" class="wid_100"><div class="basics"><input type="hidden" name="ids" value="'+ids+'" />';
                            if(act == 1){
                                title = '寄出快递';
                                html += $('.express').html();
                            }
                          html += '<div class="group clearfix"><label class="title wid_30 fl"></label><div class="fill wid_70 fl"><button type="submit" class="btn btn_yellow btn_100">保存</button></div></div></div></form></div>';
                          $('.modal-body').html(html);
                    }
               $('.modal-title').html(title);
            });
</script>
 <script type="text/javascript">
      $('.check').click(function(){
         var id=$(this).data('id'),check_status=$(this).data('status');
               $.post('{:U("Inside/setCheck_status")}',{id:id,Cstatus:check_status},function(data){
                if(data.status==1){
                  //  alert(data.info);
                   location.href = '{:U("Pledge/add_info")}/user_id/'+id;
                }else if(data.status==0){
                   alert(data.info);
                   location.reload();
                }else{
                    alert(data);
                     location.href='{:U("Check/not_index")}/check_status/'+check_status;
                }
             });


      });
</script>
</body>
</html>